package com.train.trainmanage.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.train.trainmanage.mapper.TrackModelMapper;
import com.train.trainmanage.model.TrackModel;
import com.train.trainmanage.service.TrackService;

@Service
public class TrackServiceImpl implements TrackService{
	
	@Autowired
	private TrackModelMapper trackMapper;

	@Override
	public List<TrackModel> listAllTrack() {
		List<TrackModel> result = trackMapper.allTrackList();
		return result;
	}

	@Override
	public TrackModel getByTrackId(Integer trackId) {
		TrackModel trackModel = trackMapper.selectByPrimaryKey(trackId);
		return trackModel;
	}

}
